package com.fll.codeworld.controller;

import com.fll.codeworld.comment.ParamCheckUtil;
import com.fll.codeworld.entity.NotNullAnnotationVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 测试controller
 * @author fll
 * @date 2022/04/25
 */
@RestController
@RequestMapping("/annotation")
public class TestAnnotationController {
    @RequestMapping("/testNotNullAnnotation")
    public String testNotNullAnnotation (@RequestBody NotNullAnnotationVo param){
        String checkResult = ParamCheckUtil.paramCheck(param);
        if(StringUtils.isNotBlank(checkResult)){
            return checkResult;
        }
        return "ok~~O(∩_∩)O哈哈~";
    }
}
